<template>
  <div class="root">
    <el-config-provider :locale="locale">
      <RouterView />
    </el-config-provider>
  </div>
</template>
<script setup lang="ts">
import { ElConfigProvider } from 'element-plus';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'

import { onMounted } from 'vue'

const language = ref('zh-cn')
const locale = computed(() => (language.value === 'zh-cn' ? zhCn : en))

const route = useRoute()

onMounted(() => {
  const body:any = document.querySelector('body')

  if (route.path === '/ComplexChart2.0') {
    body.style.overflow = 'hidden'
  } else {
    body.style.overflow = 'auto'
  }
})
</script>
<style scoped lang="scss">
.root{
  height: 100vh;
  overflow-y: auto;
  background-color: #fff;
}
</style>
